package com.shizhanzhe.qdd.url;

/**
 * Created by zz9527 on 2018/10/22.
 */
public class Path {
    public static String BASE_URL = "http://kaikaizc.cn";

    //图片
    public static String img(String url) {
        String path = BASE_URL + url;
        return path;
    }
    //发送短信验证码接口
    public static String SENDPHONECODE(String phone, int type,String sign) {
        return BASE_URL + "/index.php/index/index/sendPhoneCode?phone=" + phone + "&type=" + type + "&sign=" + sign;
    }
    //注册接口
    public static String PHONEREGISTER(String phone, String password, String code, String pid) {
        return BASE_URL + "/index.php/index/index/phoneRegister?phone=" + phone + "&password=" + password + "&code=" + code + "&pid=" + pid;
    }
    //会员登录接口
    public static String LOGIN(String phone, String psorcode,int type){
        //1密码  2验证码
        if (type==1){
            return BASE_URL + "/index.php/index/index/login?phone=" +phone+ "&password=" +psorcode+ "&type=1";
        } else {
            return BASE_URL + "/index.php/index/index/login?phone=" +phone+ "&code=" +psorcode+ "&type=2";
        }
    }
    //收入列表
    public static String INCOMELIST(int uid){
        return BASE_URL + "/index.php/index/index/incomeList?uid=" + uid;
    }
    /*收入详情 1：今日收入 2：任务记录 3：累计提现 4：有效徒弟 5：徒弟徒孙*/
    public static String INCOMEDETAILS(int uid, int type, int page){
        return BASE_URL + "/index.php/index/index/incomeDetails?uid=" + uid + "&type=" + type + "&page=" + page;
    }
    public static String STGRADE(int uid){
        return BASE_URL + "/index.php/index/index/stGrade?uid=" + uid;
    }
    //提现
    public static String sqDrawcash(int uid,String money, String address){
        return BASE_URL + "/index.php/index/index/sqDrawcash?uid="+ uid + "&money="+money+"&address="+address;
    }
    //分享分类
    public static String SHARETYPE() {
        String path = BASE_URL + "/index.php/index/index/artClass";
        return path;
    }
    //分享列表
    public static String SHARE( String sclass,int page) {
        String path = BASE_URL + "/index.php/index/index/artList?class=" + sclass+"&page="+page;
        return path;
    }
    //分享详情
    public static String SHAREDETAIL( int artid,int uid) {
        String path = BASE_URL + "/index.php/index/index/artDetails?artid=" + artid+"&uid="+uid;
        return path;
    }
    //分享URL
    public static String SHAREURL(String ym,int artid , int uid, int type) {
        String path = ym + "/index.php/index/index/nativeShares?artid=" + artid + "&uid=" + uid + "&type=" +type;
        return path;
    }
    //分享URL2
    public static String SHAREURL2(String ym,int artid , int uid) {
        String path = ym + "/share_" + uid + "_" + artid +"_1.html" ;
        return path;
    }

    //搜索
    public static String SHARESEARCH(String name,int page) {
        String path = BASE_URL + "/index.php/index/index/artSearch?name="+ name+"&page="+page;
        return path;
    }
    //搜索
    public static String stzMoney(int uid) {
        String path = BASE_URL + "/index.php/index/index/stzMoney?uid="+ uid;
        return path;
    }
    //修改密码
    public static String password_xiu(String phone, String code, String password){
        return BASE_URL + "/index.php/index/index/password_xiu?phone="+phone+"&code="+code+"&password=" + password;
    }
    //修改头像
    public static final String avatarUpload = BASE_URL + "/index.php/index/index/avatarUpload";
    //修改个人信息
    public static final String personal_xiu = BASE_URL + "/index.php/index/index/personal_xiu";
    //提现记录
    public static final String successTixian = BASE_URL + "/index.php/index/index/successTixian";
    //获取余额
    public static final String money = BASE_URL + "/index.php/index/index/balance";
    //微信登录
    public static String wxlogin(String unionid,String openid,String nickname,String avatar,String pid){
//        avatar = "".equals(avatar) ? "0" : avatar;
        return BASE_URL + "/index.php/index/api/wxLogin?unionid="+unionid+"&openid="+openid+"&nickname="+nickname+"&avatar=" + avatar+"&pid=" + pid;
    }

    //修改密码
    public static String Bind(int uid, String phone,String code){
        return BASE_URL + "/index.php/index/api/bindingPhone?uid="+uid+"&phone="+phone+"&code="+code;
    }
    //分享记录
    public static String SHARERECORD(int artid , int uid) {
        String path =Path.BASE_URL+ "/index.php/index/index/shareRecode?artid=" + artid + "&uid=" + uid  ;
        return path;
    }
}
